﻿using Autofac.Core;
using System;
using System.Collections.Generic;
using System.Text;
using ZilLion.Service.Core.Ioc;

namespace ZilLion.Service.Core.CRMUnities.IOC
{
    public static class ClassFactory
    {
        /// <summary>
        ///     获取实例 泛型方法
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="parameters"></param>
        /// <returns></returns>
        public static T GetInstance<T>(
            params Parameter[] parameters) where T : class
        {
             T InstanceObject = IocContainer.Resolve<T>(null, parameters);
            return InstanceObject;
        }

    }
}
